package com.bw.user.controller;


import cn.hutool.core.util.ObjectUtil;
import com.bw.core.result.ResponseResult;
import com.bw.user.pojo.TbCallBookAuth;
import com.bw.user.service.TbCallBookAuthService;
import com.bw.user.vo.CallbookVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 通讯录认证&信息 前端控制器
 * </p>
 *
 * @author lv
 * @since 2021-03-23
 */
@RestController
@RequestMapping("/tb-call-book-auth")
public class TbCallBookAuthController {


    @Autowired
    private TbCallBookAuthService bookAuthService;

    /**、
     *
     * @param callbookVo
     * @return
     * 通讯录
     */
    @PostMapping("/callbook")
    public ResponseResult callBook(@RequestBody CallbookVo callbookVo)
    {
        if (ObjectUtil.isNull(callbookVo)){
            return ResponseResult.error("对象为空");
        }
        return bookAuthService.callbook(callbookVo);
    }



}
